package com.tencent.hummingbird.portal.service;

import com.github.pagehelper.PageInfo;
import com.tencent.hummingbird.portal.pojo.Question;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tencent.hummingbird.portal.pojo.User;
import com.tencent.hummingbird.portal.vo.AskVO;
import com.tencent.hummingbird.portal.vo.EditQuestionVO;
import com.tencent.hummingbird.portal.vo.QuestionVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yxb
 * @since 2024-01-10
 */
public interface IQuestionService extends IService<Question> {
    PageInfo<Question> getMyQuestions(String username, Integer pageNum, Integer pageSize);
    /**
     * @param userName 当前登录用户
    */
    void saveQuestion(QuestionVO questionVO,String userName);

    Integer countQuestionsByUserId(Integer userId);

    PageInfo<Question> getQuestionsByTeacherName(String teacherName,Integer pageNum,Integer pageSize);


    Question getQuestionById(Integer id);

    PageInfo<AskVO> getMyAskByUserName(String userName,Integer pageNum,Integer pageSize);

    Integer updateViewsById(Integer questionId);

    Question selectQuestionById(Integer id);

    void updateQuestion(EditQuestionVO editQuestionVO);

    PageInfo<Question> selectHostQuestions(Integer pageNum,Integer pageSize);

    PageInfo<Question> selectWork(String teacherName,Integer status,Integer pageNum,Integer pageSize);

    EditQuestionVO getEditQuestionVOById(Integer id);

    List<User> getTeachersById(Integer id);
}
